package domd7;
import java.util.Scanner;
public class test {
    public static void main(String[] args)
            throws CloneNotSupportedException {
        person person1=new person(18,"lisa");
        person person2=(person) person1.clone();
        System.out.println("修改前" + person1.dog.name);
        System.out.println("修改前" + person2.dog.name);
        person2.dog.name="小白";
        System.out.println("修改前" + person1.dog.name);
        System.out.println("修改后" + person2.dog.name);
    }
}


